import 'CustomerList.dart';

class CustomerDetail {
  CustomerListItem? customerInfo;
  ReconnaissanceLink? reconnaissanceLink;
  DesignDrawLink? designDrawLink;
  StartedApproval? startedApproval;
  ConstructionLink? constructionLink;
  GridConnectedLink? gridConnectedLink;
  Acceptance? acceptanceLink;

  CustomerDetail(
      {this.customerInfo,
        this.reconnaissanceLink,
        this.designDrawLink,
        this.startedApproval,
        this.constructionLink,
        this.gridConnectedLink,
        this.acceptanceLink});

  CustomerDetail.fromJson(Map<String, dynamic> json) {
    customerInfo = json['customerInfo'] != null
        ? new CustomerListItem.fromJson(json['customerInfo'])
        : null;
    reconnaissanceLink = json['reconnaissanceLink'] != null
        ? new ReconnaissanceLink.fromJson(json['reconnaissanceLink'])
        : null;
    designDrawLink = json['designDrawLink'] != null
        ? new DesignDrawLink.fromJson(json['designDrawLink'])
        : null;
    startedApproval = json['startedApproval'] != null
        ? new StartedApproval.fromJson(json['startedApproval'])
        : null;
    constructionLink = json['constructionLink'] != null
        ? new ConstructionLink.fromJson(json['constructionLink'])
        : null;
    gridConnectedLink = json['gridConnectedLink'] != null
        ? new GridConnectedLink.fromJson(json['gridConnectedLink'])
        : null;
    acceptanceLink = json['acceptanceLink'] != null
        ? new Acceptance.fromJson(json['acceptanceLink'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.customerInfo != null) {
      data['customerInfo'] = this.customerInfo!.toJson();
    }
    if (this.reconnaissanceLink != null) {
      data['reconnaissanceLink'] = this.reconnaissanceLink!.toJson();
    }
    if (this.designDrawLink != null) {
      data['designDrawLink'] = this.designDrawLink!.toJson();
    }
    data['startedApproval'] = this.startedApproval;
    data['constructionLink'] = this.constructionLink;
    data['gridConnectedLink'] = this.gridConnectedLink;
    data['acceptanceLink'] = this.acceptanceLink;
    return data;
  }
}
